
<div class="col-sm-6" id="book_preview">
    <div class='book-preview-page'>
        <h3>RIGHT PANEL</h3>
    </div>
</div>
<script>
    $(function(){
        var offtop = $("#book_preview").offset().top;
        var MIN_WIDTH = 767;
        $("#book_preview").pin({
            top: 50,
            minWidth: MIN_WIDTH,
            afterScroll: function(){
                $("#book_preview").height(window.innerHeight - offtop);
//                var height = window.innerHeight - ($("#book_preview").offset().top - $(window).scrollTop())
//                $("#book_preview").css({"height": height + "px"})
            }
        });
    });
</script>